#ifndef COMMON_H_
#define COMMON_H_

#include "consts.h"
#include "sys_struct.h"
#include "device.h"

public super_block filesys;

public dev device_list[N_DEV];

public data_memory bflist[ DAT_BF_SIZE ];
public inode_memory inode_buffers[ INODE_BF_SIZE ];
public byte buffer[ DAT_BF_SIZE ][ BLOCK_SIZE ];

public data_memory freelist, busylist;
/*
 * handle of files
 * some special handles: 0 for stdin 1 for stdout 2 for stderr 3 for current directory
 * */
public file_handle file_handles[FH_SIZE];

public struct{
    char* dir;
    int len;
    int ino;
    int size;
}current_dir;

#endif
